package com.lichhao.common.converter;

import org.springframework.core.convert.converter.Converter;
import com.lichhao.common.model.BaseBean;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;

public class CommonWriteConverter implements Converter<BaseBean, DBObject> {

	public DBObject convert(BaseBean source) {

		DBObject dbo = new BasicDBObject();
		dbo.putAll(source.toMap());

		return dbo;
	}
}
